home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98c.txt
/
000035_icon-group-sender _Wed Sep 16 16:47:20 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) with SMTP id QAA10673
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Wed, 16 Sep 1998 16:47:19 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA05641; Wed, 16 Sep 1998 16:46:51 -0700
Message-Id: <4FD6422BE942D111908D00805F3158DF0757B5AF@RED-MSG-52>
From: Todd Proebsting <toddpro@microsoft.com>
To: icon-group@optima.CS.Arizona.EDU
Subject: RE: Context Switching
Date: Wed, 16 Sep 1998 13:16:15 -0700
X-Mailer: Internet Mail Service (5.5.2232.9)
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
The problem of implementing co-expressions is directly related to how the
implementation handles generators. If generators use stack allocation AND
they leave activation records on the stack at a co-expression invocation,
then separate stacks are necessary for co-expressions. Otherwise, suspended
activation records from different co-expressions could become interwoven,
and that would spell disaster.
The current Icon interpreter uses recursion for some generators. Because
the interpreter is written in C, uses recursion, and leaves those
activations on the stack at co-expression invocation, there is no getting
around the need for separate stacks. The recursive interpreter model is
quite elegant---getting rid of it to support co-expressions would be a giant
pain.
Jcon (http://www.cs.arizona.edu/icon/jcon/) does not use a recursive
interpreter, but suspended procedures definitely live on the stack at
co-expression invocations. Therefore, it also relies on a context-switching
mechanism (Java threads) to maintain multiple stacks.
If the underlying implementation language (e.g., C or Java) supports only
stack allocation of activation records, then it would be necessary to make
sure the stack is ALWAYS in the same configuration at co-expression
activation to avoid the need for a context switch. This would be very
painful in compiled code. In an interpreter it would be easier, but no fun.
Todd Proebsting